package com.esisa.listners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Date;

import com.esisa.beans.Etudiant;
import com.esisa.beans.ListeSCORM;
import com.esisa.swing.Form;

public class Save implements ActionListener {
	private ListeSCORM liste;
	private Form f;
	
	public Save(ListeSCORM liste, Form f) {
		super();
		this.liste = liste;
		this.f = f;
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO Auto-generated method stub
		Etudiant d = new Etudiant(f.getText("Nom :"), f.getText("Prenom :"), f.getText("Chemin :"), f.getText("Age :"), f.getText("Absence :"), f.getText("Presence :"), f.getText("Retard :"), f.getText("Remarque :"));
		liste.insert(d);
		liste.save("resources/doc.txt");
		
	}

}
